package dao;

import model.entity.Dish;
import model.entity.ShoppingCart;

import java.util.List;

public interface ShopCartDao {
    List<ShoppingCart> get(int id);
    void deleteById(int id);
    void add(String name, String image, int user_id, int dish_id, int setmeal_id, int number, float amount);
    Dish find(int id);
    List<Integer> getId(int dishId);
    int getNum(int dishId);
    void addOne(int dishId);
    void upAmount(int dishId,float amount);
    void delAll(int userId);
    float getAmount(int userId);
    List<ShoppingCart> Get(int userId);

    //查询购物车中是否存在该菜品
    List<ShoppingCart> list(int userId, Integer dishId, Integer setmealId);
    //修改购物车中商品数量
    void updateNumberById(ShoppingCart shoppingCart);
    //新增购物车数据
    void insert(ShoppingCart shoppingCart);
}
